[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
biosequip() Check Equipment
#include <bios.h>
int biosequip(void);
biosequip() uses BIOS interrupt 0x11 to return an integer describing
the number and types of equipment connected to an IBM or compatible
system.
Returns: A group of bit-sized fields with the following
meanings:
bit 15 Number of printers
bit 14 Number of printers
bit 13 Unused
bit 12 Game I/O attached
bit 11 Number of RS232 ports
bit 8 Unused
bit 7 Number of diskette drives
bit 6 Number of diskette drives
00 = 1 drive
01 = 2 drives
10 = 3 drives
11 = 4 drives, only if bit 0 is 1
bit 5 Initial
bit 4 Video mode
00 = Unused
01 = 40x25 BW with color card
10 = 80x25 BW with color card
11 = 80x25 BW with mono card
bit 3 Motherboard
bit 2 RAM size
00 = 16K
01 = 32K
10 = 48K
11 = 64K
bit 1 Floating-point coprocessor
bit 0 Boot from diskette
Portability: IBM PC and compatibles only.
-------------------------------- Example ---------------------------------
The following statements list some of the equipment available on the
computer.
#include <stdio.h> /* for printf */
#include <bios.h> /* for biosequip */
main()
{
int equip;
equip = biosequip();
printf("%d printers\n",equip >> 14 & 3);
printf("Game I/O is %sattached\n",
(equip & 0xB00) ? "":"NOT ");
printf("%d RS232 ports \n",equip >> 11 & 1);
printf("Floating point coprocessor is %spresent\n",
(equip & 1) ? "":"NOT ");
}
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson